<div>
<h1>Добавление торрента</h1>
<h2>Видео: <a href="{%link[admin_update_video,index,id={%id_video%}]%}">{%video_title%}</a></h2>
<form action="{%link[{%class%},{%method%},video={%id_video%}]%}" method="post">
<input type="hidden" name="edit" value="1" />
<table>
<tr>
   <td valign="top">
      Заголовок <span class="required">*</span>
   </td>
   <td>
      <input type="text" name="title" value="{%title%}" size="50" class="i" />
      {%error_title%}
   </td>
</tr>
<tr>
   <td valign="top">
      Ссылка
   </td>
   <td>
      <input type="text" name="link" value="{%link%}" size="50" class="i" />
      {%error_link%}
   </td>
</tr>
<tr>
   <td valign="top">
      Торент <span class="required">*</span>
   </td>
   <td>
      <input type="text" name="torrent" id="torrent" value="{%torrent%}" size="50" class="i downloaded" /> <a href="{%link[admin_manage_torrents,upload,video={%id_video%},KeepThis=true,TB_iframe=true,height=200,width=450]%}" class="download thickbox" title="Загрузить торрент-файл" onclick="return false"></a>
      {%error_torrent%}
   </td>
</tr>
<tr>
   <td valign="top">
      Размер
   </td>
   <td>
      <input type="text" name="size" value="{%size%}" size="20" class="i" />
      {%error_size%}
   </td>
</tr>
<tr>
   <td valign="top">
      Формат
   </td>
   <td>
      <input type="text" name="format" value="{%format%}" size="20" class="i" />
      {%error_format%}
   </td>
</tr>
<tr>
   <td valign="top">
      Перевод
   </td>
   <td>
      <input type="text" name="translate" value="{%translate%}" size="50" class="i" />
      {%error_translate%}
   </td>
</tr>
<tr>
   <td valign="top">
      Качество
   </td>
   <td>
      <input type="text" name="quality" value="{%quality%}" size="50" class="i" />
      {%error_quality%}
   </td>
</tr>
<tr>
   <td valign="top">
      Видеокодек
   </td>
   <td>
      <input type="text" name="video_codec" value="{%video_codec%}" size="20" class="i" />
      {%error_video_codec%}
   </td>
</tr>
<tr>
   <td valign="top">
      Информация по видео
   </td>
   <td>
      <textarea name="video" class="i wide">{%video%}</textarea>
      {%error_video%}
   </td>
</tr>
<tr>
   <td valign="top">
      Аудиокодек
   </td>
   <td>
      <input type="text" name="audio_codec" value="{%audio_codec%}" size="20" class="i" />
      {%error_audio_codec%}
   </td>
</tr>
<tr>
   <td valign="top">
      Информация по аудио
   </td>
   <td>
      <textarea name="audio" class="i wide">{%audio%}</textarea>
      {%error_audio%}
   </td>
</tr>
<tr>
   <td colspan="2">
      &nbsp;
   </td>
</tr>
<tr>
   <td colspan="2">
      <input type="submit" value="Добавить" class="b" />
   </td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
function setTorrent(link) {
    $('#torrent').val(link);
}
</script>